package com.yunshang.shoppingmall.service.impl;

import com.yunshang.shoppingmall.entity.Privilege;
import com.yunshang.shoppingmall.mapper.PrivilegeMapper;
import com.yunshang.shoppingmall.service.PrivilegeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service("privilegeService")
public class PrivilegeServiceImpl implements PrivilegeService {

    @Autowired
    PrivilegeMapper privilegeMapper;

    @Override
    public int deleteByPrimaryKey(Integer priId) {
        return privilegeMapper.deleteByPrimaryKey(priId);
    }

    @Override
    public int insert(Privilege privilege) {
        return privilegeMapper.insert(privilege);
    }

    @Override
    public int insertSelective(Privilege record) {
        return 0;
    }

    @Override
    public Privilege selectByPrimaryKey(Integer priId) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(Privilege record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKeyWithBLOBs(Privilege record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(Privilege record) {
        return 0;
    }

    @Override
    public int delPrivilegeByUserId(int userId) {
        return privilegeMapper.delPrivilegeByUserId(userId);
    }

    @Override
    public List<Privilege> selectPrivilegeByUserId(int userId) {
        return privilegeMapper.selectPrivilegeByUserId(userId);
    }
}
